﻿Imports System.Data.OleDb

Partial Public Class discussion
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim MaterialID = Request.Params("ID")
        Dim conn = New OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings _
                 ("ConnectionString").ToString())
        conn.Open()


        Dim postingStr As String = "SELECT * FROM DiscussionPosts where [MaterialTitle]= @ID"
        MaterialID = 4
        Dim postingDBcmd As New OleDb.OleDbCommand(postingStr, conn)
        postingDBcmd.Parameters.AddWithValue("@ID", MaterialID)

        Dim dbread = postingDBcmd.ExecuteReader()
        Repeater1.DataSource = dbread
        Repeater1.DataBind()



    End Sub

End Class